#include "Multifit.h"

using namespace RPI_GSL;

int main(int argc, char **argv){
  Multifit m(9,3);
  double z[]={3,5,7,9,11,13,15,17,19};
  double x[]={1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0};
  m.solve(z,x);
  double *a = m.getp();
  printf("%g %g %g\n",a[0],a[1],a[2]);
  double z2[]={2,4,6,8,10,12,14,16,18};
  double x2[]={1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0};
  m.solve(z2,x2);
  a = m.getp();
  printf("%g %g %g\n",a[0],a[1],a[2]);
}
